package a入门.day3;

import java.util.Scanner;

public class 逻辑运算符 {
    public static void 基本使用(String[] args) {
        int a=10,b=5,c=20;
        System.out.println((a<b)&&((a%5)==0));//false
        System.out.println((a<b)||((a%5)==0));//true
        System.out.println(false||true&&true);
        System.out.println(!false);

    }

    public static void main1(String[] args) {
        //短路运算符
        int a=10,b=5,c=20;
        System.out.println(a > c && ++a < c);
        System.out.println(a<c ||a++ > b);
        System.out.println(a);
    }

    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入一个数字：");
        int x=in.nextInt();
        System.out.println(x>5||x<-5);
    }
}
